package com.jbm.onehome.iface;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-02-22.
 */
@Entity
@javax.persistence.Table(name = "weather", schema = "", catalog = "")
@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class WeatherEntity implements Serializable {
    private static final long serialVersionUID = -7201276184651667330L;
    private Timestamp updatetime;

    @Id
    @javax.persistence.Column(name = "updatetime")
    public Timestamp getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Timestamp updatetime) {
        this.updatetime = updatetime;
    }

    private String city;

    @Basic
    @javax.persistence.Column(name = "city")
    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    private String cityid;

    @Id
    @javax.persistence.Column(name = "cityid")
    public String getCityid() {
        return cityid;
    }

    public void setCityid(String cityid) {
        this.cityid = cityid;
    }

    private String prov;

    @Basic
    @javax.persistence.Column(name = "prov")
    public String getProv() {
        return prov;
    }

    public void setProv(String prov) {
        this.prov = prov;
    }

    private String cond;

    @Basic
    @javax.persistence.Column(name = "cond")
    public String getCond() {
        return cond;
    }

    public void setCond(String cond) {
        this.cond = cond;
    }

    private String condcode;

    @Basic
    @javax.persistence.Column(name = "condcode")
    public String getCondcode() {
        return condcode;
    }

    public void setCondcode(String condcode) {
        this.condcode = condcode;
    }

    private String fl;

    @Basic
    @javax.persistence.Column(name = "fl")
    public String getFl() {
        return fl;
    }

    public void setFl(String fl) {
        this.fl = fl;
    }

    private String hum;

    @Basic
    @javax.persistence.Column(name = "hum")
    public String getHum() {
        return hum;
    }

    public void setHum(String hum) {
        this.hum = hum;
    }

    private String pcpn;

    @Basic
    @javax.persistence.Column(name = "pcpn")
    public String getPcpn() {
        return pcpn;
    }

    public void setPcpn(String pcpn) {
        this.pcpn = pcpn;
    }

    private String pres;

    @Basic
    @javax.persistence.Column(name = "pres")
    public String getPres() {
        return pres;
    }

    public void setPres(String pres) {
        this.pres = pres;
    }

    private String tmp;

    @Basic
    @javax.persistence.Column(name = "tmp")
    public String getTmp() {
        return tmp;
    }

    public void setTmp(String tmp) {
        this.tmp = tmp;
    }

    private String vis;

    @Basic
    @javax.persistence.Column(name = "vis")
    public String getVis() {
        return vis;
    }

    public void setVis(String vis) {
        this.vis = vis;
    }

    private String winddir;

    @Basic
    @javax.persistence.Column(name = "winddir")
    public String getWinddir() {
        return winddir;
    }

    public void setWinddir(String winddir) {
        this.winddir = winddir;
    }

    private String windsc;

    @Basic
    @javax.persistence.Column(name = "windsc")
    public String getWindsc() {
        return windsc;
    }

    public void setWindsc(String windsc) {
        this.windsc = windsc;
    }

    private String windspd;

    @Basic
    @javax.persistence.Column(name = "windspd")
    public String getWindspd() {
        return windspd;
    }

    public void setWindspd(String windspd) {
        this.windspd = windspd;
    }

    private String aqi;

    @Basic
    @javax.persistence.Column(name = "aqi")
    public String getAqi() {
        return aqi;
    }

    public void setAqi(String aqi) {
        this.aqi = aqi;
    }

    private String qlty;

    @Basic
    @javax.persistence.Column(name = "qlty")
    public String getQlty() {
        return qlty;
    }

    public void setQlty(String qlty) {
        this.qlty = qlty;
    }

    private String tmpmax;

    @Basic
    @javax.persistence.Column(name = "tmpmax")
    public String getTmpmax() {
        return tmpmax;
    }

    public void setTmpmax(String tmpmax) {
        this.tmpmax = tmpmax;
    }

    private String tmpmin;

    @Basic
    @javax.persistence.Column(name = "tmpmin")
    public String getTmpmin() {
        return tmpmin;
    }

    public void setTmpmin(String tmpmin) {
        this.tmpmin = tmpmin;
    }

    private Timestamp createdate;

    @Basic
    @javax.persistence.Column(name = "createdate")
    public Timestamp getCreatedate() {
        return createdate;
    }

    public void setCreatedate(Timestamp createdate) {
        this.createdate = createdate;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WeatherEntity that = (WeatherEntity) o;

        if (aqi != null ? !aqi.equals(that.aqi) : that.aqi != null) return false;
        if (city != null ? !city.equals(that.city) : that.city != null) return false;
        if (cityid != null ? !cityid.equals(that.cityid) : that.cityid != null) return false;
        if (cond != null ? !cond.equals(that.cond) : that.cond != null) return false;
        if (condcode != null ? !condcode.equals(that.condcode) : that.condcode != null) return false;
        if (createdate != null ? !createdate.equals(that.createdate) : that.createdate != null) return false;
        if (fl != null ? !fl.equals(that.fl) : that.fl != null) return false;
        if (hum != null ? !hum.equals(that.hum) : that.hum != null) return false;
        if (pcpn != null ? !pcpn.equals(that.pcpn) : that.pcpn != null) return false;
        if (pres != null ? !pres.equals(that.pres) : that.pres != null) return false;
        if (prov != null ? !prov.equals(that.prov) : that.prov != null) return false;
        if (qlty != null ? !qlty.equals(that.qlty) : that.qlty != null) return false;
        if (tmp != null ? !tmp.equals(that.tmp) : that.tmp != null) return false;
        if (tmpmax != null ? !tmpmax.equals(that.tmpmax) : that.tmpmax != null) return false;
        if (tmpmin != null ? !tmpmin.equals(that.tmpmin) : that.tmpmin != null) return false;
        if (updatetime != null ? !updatetime.equals(that.updatetime) : that.updatetime != null) return false;
        if (vis != null ? !vis.equals(that.vis) : that.vis != null) return false;
        if (winddir != null ? !winddir.equals(that.winddir) : that.winddir != null) return false;
        if (windsc != null ? !windsc.equals(that.windsc) : that.windsc != null) return false;
        if (windspd != null ? !windspd.equals(that.windspd) : that.windspd != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = updatetime != null ? updatetime.hashCode() : 0;
        result = 31 * result + (city != null ? city.hashCode() : 0);
        result = 31 * result + (cityid != null ? cityid.hashCode() : 0);
        result = 31 * result + (prov != null ? prov.hashCode() : 0);
        result = 31 * result + (cond != null ? cond.hashCode() : 0);
        result = 31 * result + (condcode != null ? condcode.hashCode() : 0);
        result = 31 * result + (fl != null ? fl.hashCode() : 0);
        result = 31 * result + (hum != null ? hum.hashCode() : 0);
        result = 31 * result + (pcpn != null ? pcpn.hashCode() : 0);
        result = 31 * result + (pres != null ? pres.hashCode() : 0);
        result = 31 * result + (tmp != null ? tmp.hashCode() : 0);
        result = 31 * result + (vis != null ? vis.hashCode() : 0);
        result = 31 * result + (winddir != null ? winddir.hashCode() : 0);
        result = 31 * result + (windsc != null ? windsc.hashCode() : 0);
        result = 31 * result + (windspd != null ? windspd.hashCode() : 0);
        result = 31 * result + (aqi != null ? aqi.hashCode() : 0);
        result = 31 * result + (qlty != null ? qlty.hashCode() : 0);
        result = 31 * result + (tmpmax != null ? tmpmax.hashCode() : 0);
        result = 31 * result + (tmpmin != null ? tmpmin.hashCode() : 0);
        result = 31 * result + (createdate != null ? createdate.hashCode() : 0);
        return result;
    }
}
